Skip to content

Conversation

@takapi327
Copy link
Owner

@takapi327 takapi327 commented Dec 21, 2025

Implementation Details

The max_allowed_packet setting for the MySQL protocol can now be configured via the ldbc Connector. This enables enhanced security and optimised performance.

  1. Enhanced Security
  • Prevention of memory exhaustion attacks: Protects against memory consumption attacks using massive packets
  • Prevention of DoS attacks: Blocks denial-of-service attacks involving large data transmissions
  • MySQL JDBC Driver compliance: Ensures compatibility with industry-standard security practices
  1. Operational Flexibility
  • Adjustments based on application requirements: Relaxing restrictions for applications handling BLOBs or large volumes of data
  • Resource usage control: Enabling predictable memory usage and optimizing operational costs
  • Compliance with protocol specifications: Ensuring configurations remain within the MySQL specification's 16MB limit
// Conservative security settings (64KB - default)
val secureConfig = MySQLConfig.default
  .setMaxAllowedPacket(65535) // MySQL JDBC Driver Compatible

// For applications handling BLOBs and large amounts of data
val dataIntensiveConfig = MySQLConfig.default
  .setMaxAllowedPacket(16777215) // 16MB (Maximum Protocol)

Fixes

Fixes #xxxxx

Pull Request Checklist

  • Wrote unit and integration tests
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code formatting by scalafmt (sbt scalafmtAll command execution)
  • Add copyright headers to new files

References

@takapi327 takapi327 added this to the 0.5.0 milestone Dec 21, 2025
@takapi327 takapi327 self-assigned this Dec 21, 2025
@takapi327 takapi327 added 🔧 refactor Refactoring ldbc:connector Addition and modification of functionality to Connector projects labels Dec 21, 2025
@takapi327 takapi327 mentioned this pull request Dec 21, 2025
16 tasks
Base automatically changed from refactor/2025-12-ConcurrentBag-atomic-check to series/0.5.x December 21, 2025 15:46
@codecov-commenter
Copy link

codecov-commenter commented Dec 21, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 80.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.12%. Comparing base (aa1fa2d) to head (9e26892).
⚠️ Report is 6 commits behind head on series/0.5.x.

Files with missing lines Patch % Lines
...c/main/scala/ldbc/connector/net/PacketSocket.scala 69.23% 4 Missing ⚠️
...bc/connector/exception/PacketTooBigException.scala 0.00% 3 Missing ⚠️
...red/src/main/scala/ldbc/connector/Connection.scala 60.00% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@               Coverage Diff                @@
##           series/0.5.x     #604      +/-   ##
================================================
+ Coverage         83.67%   84.12%   +0.44%     
================================================
  Files               216      217       +1     
  Lines             11982    12333     +351     
  Branches           1270     1243      -27     
================================================
+ Hits              10026    10375     +349     
- Misses             1956     1958       +2     
Flag Coverage Δ
3.3.7 84.78% <80.00%> (+0.27%) ⬆️
3.7.4 84.61% <80.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@takapi327 takapi327 changed the title Refactor/2025 12 added max payload check 🚀 Add configurable maxAllowedPacket setting for enhanced security and performance control Dec 25, 2025
@takapi327 takapi327 merged commit 272cf4e into series/0.5.x Dec 25, 2025
75 of 91 checks passed
@takapi327 takapi327 deleted the refactor/2025-12-Added-max-payload-check branch December 25, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ldbc:connector Addition and modification of functionality to Connector projects 🔧 refactor Refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants